<?php
if(!isset($_SESSION))
    session_start();
$ini_array = parse_ini_file("qiao.ini");
$host = $ini_array[ip_address];
$username = $_POST["username"];
$password = $_POST['password'];
$email=$_POST['email'];
require_once '20161010_1.php';
$sq = "INSERT INTO userinfo(user_name,user_password,birth_date) VALUES ('$username','$password',NOW())";
$sql = "SELECT count(*) from userinfo WHERE user_name='$username'";
$result = mysqli_query($conn, $sql);
$row = mysqli_fetch_array($result, MYSQLI_NUM);
if($row[0]>0){
  $_SESSION['repeat']="repeat";
  header("Location:".$host."/zuoye.php");
}else{
    $_SESSION['repeat']=NULL;
  mysqli_multi_query($conn,$sq);
mysqli_close ($conn) ;
header("Location:".$host."/homepage.php");
}
?>

